/**
 *  @file InternalLock.h
 */
#ifndef _INTERNALLOCK_H_
#define _INTERNALLOCK_H_


#ifdef __cplusplus
extern "C" {
#endif

/*
 *  The locks here are intended to be used internally by cppflib classes.
 *  Any part of the library which would like to have a global lock should 
 *  register itself at the enum below.
 */
typedef enum _lockparty
{
   LP_MEMPOOL,      ///< memory pool
#if defined(WIN32)
   LP_SOCKETRESOURCE, ///< socket environnment
#endif
   LP_SSLRESOURCE,  ///< SSL resource

   NR_LOCKPARTIES,
} lockparty_t;

void INTL_InitAllLocks(void);
void INTL_AcquireLock(lockparty_t party);
void INTL_ReleaseLock(lockparty_t party);
void INTL_DeleteAllLocks(void);

#ifdef __cplusplus
}
#endif

#endif
